package org.dromara.business.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.business.domain.Coupon;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;

import java.math.BigDecimal;

/**
 * 拼团优惠券业务对象 coupon
 *
 * @author zlj
 * @date 2025-04-27
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = Coupon.class, reverseConvertGenerate = false)
public class CouponBo extends BaseEntity {

    /**
     * id
     */
    @NotNull(message = "id不能为空", groups = { EditGroup.class })
    private Long couponId;

    /**
     * 金额
     */
    @NotNull(message = "金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal amount;

    /**
     * 优惠券id
     */
    @NotNull(message = "优惠券id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long goodsCouponId;

    /**
     * 是否使用 1已使用 0未使用
     */
    @NotBlank(message = "是否使用 1已使用 0未使用不能为空", groups = { AddGroup.class, EditGroup.class })
    private String status;
    private String name;
    private String remark;

    /**
     * 满多少可用
     */
    private BigDecimal conditionAmount;
    //已满金额
    private BigDecimal goodsAmount;
}
